package com.edgclub.edg.api;

import android.content.Context;

import com.edgclub.edg.api.param.MessageParam;
import com.edgclub.edg.http.VolleyListener;


/**
 * 好友相关api
 * 
 * @author 陈坤彬
 *
 */
public class FriendApi extends GuZhiApi {

	public FriendApi(Context mContext) {
		super(mContext);
	}



	/**
	 * 打招呼
	 * 
	 * @param params
	 * @param listener
	 */
	public void sayHello(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_RELATION, ApiConfig.APIURL.URL_RELATION,
				params, listener);
	}

	/**
	 * 加好友
	 * 
	 * @param params
	 * @param listener
	 */
	public void makeFriend(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_RELATION, ApiConfig.APIURL.URL_RELATION,
				params, listener);
	}

	/**
	 * 拉黑好友
	 * 
	 * @param listener
	 */
	public void blackFriend(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_RELATION, ApiConfig.APIURL.URL_RELATION,
				params, listener);
	}

	/**
	 * 解除拉黑
	 * 
	 * @param listener
	 */
	public void removeBlackFriend(MessageParam params,
			VolleyListener listener) {
		post(ApiConfig.APIURL.URL_RELATION, ApiConfig.APIURL.URL_RELATION,
				params, listener);
	}

	/**
	 * 删除好友
	 * 
	 * @param listener
	 */
	public void deleteFriend(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_RELATION, ApiConfig.APIURL.URL_RELATION,
				params, listener);
	}

	/**
	 * 恢复接受
	 * 
	 * @param listener
	 */
	public void recoverFriend(MessageParam params,
			VolleyListener listener) {
		post( ApiConfig.APIURL.URL_RELATION, ApiConfig.APIURL.URL_RELATION,
				params, listener);
	}


	/**
	 * 获取群组列表接口
	 * @param params
	 * @param listener
     */
	public void getAllGroupList(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_GROUP_LOAD, ApiConfig.APIURL.URL_GROUP_LOAD,
				params, listener);
	}
	/**
	 * 群详情接口
	 * @param params
	 * @param listener
	 */
	public void getGroupDetall(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_GROUP_DETAIL, ApiConfig.APIURL.URL_GROUP_DETAIL,
				params, listener);
	}
	/**
	 * 加入群接口
	 * @param params
	 * @param listener
	 */
	public void AddGroupQuit(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_GROUP_APPLY, ApiConfig.APIURL.URL_GROUP_APPLY,
				params, listener);
	}
	/**
	 * 退群接口
	 * @param params
	 * @param listener
	 */
	public void quitGroup(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_GROUP_USERS_QUIT, ApiConfig.APIURL.URL_GROUP_USERS_QUIT,
				params, listener);
	}
	/**
	 *  群成员列表接口
	 * @param params
	 * @param listener
	 */
	public void getGroupMembers(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_GROUP_MEMBER_LIST, ApiConfig.APIURL.URL_GROUP_MEMBER_LIST,
				params, listener);
	}

	/**
	 * 根据imid获取用户信息接口
	 * @param params
	 * @param listener
     */
	public void getUserFromIm(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_From_USER, ApiConfig.APIURL.URL_From_USER,
				params, listener);
	}
	/**
	 * 根据imid获取用户信息接口
	 * @param params
	 * @param listener
	 */
	public void getGroupFromIm(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_From_GROUP, ApiConfig.APIURL.URL_From_GROUP,
				params, listener);
	}
	/**
	 * 关注和取消关注接口
	 * @param params
	 * @param listener
	 */
	public void getSubscribe(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_SUBSCRIBE, ApiConfig.APIURL.URL_SUBSCRIBE,
				params, listener);
	}
	/**
	 * 设置用户备注名称
	 * @param params
	 * @param listener
	 */
	public void AddAlias(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_ALIAS, ApiConfig.APIURL.URL_ALIAS,
				params, listener);
	}
	/**
	 * 我的粉丝
	 * @param params
	 * @param listener
	 */
	public void getmyFans(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_FANS, ApiConfig.APIURL.URL_FANS,
				params, listener);
	}
	/**
	 * 我的关注
	 * @param params
	 * @param listener
	 */
	public void getmyFollow(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_FOLLOW, ApiConfig.APIURL.URL_FOLLOW,
				params, listener);
	}

	/**
	 * 用户搜索接口
	 * @param params
	 * @param listener
	 */
	public void userSearch(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_USER_SEARCH, ApiConfig.APIURL.URL_USER_SEARCH,
				params, listener);
	}

	/**
	 * 用户搜索接口
	 * @param params
	 * @param listener
	 */
	public void groupuserSearch(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_GROUP_USER_SEARCH, ApiConfig.APIURL.URL_GROUP_USER_SEARCH,
				params, listener);
	}

	/**
	 * 踢人接口
	 * @param params
	 * @param listener
	 */
	public void kickGroup(MessageParam params, VolleyListener listener) {
		post(ApiConfig.APIURL.URL_KICK_GROUP, ApiConfig.APIURL.URL_KICK_GROUP,
				params, listener);
	}

}
